/**
 * There are <a href="https://github.com/thinkgem/jeesite">JeeSite</a> code generation
 */
package com.chlitina.store.modules.message.service;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import com.chlitina.store.common.service.BaseService;
import com.chlitina.store.modules.message.dao.SystemNotifyMessageDao;
import com.chlitina.store.modules.message.entity.SystemNotifyMessage;

/**
 * 系统提示信息Service
 * @author lvbo
 * @version 2013-07-16
 */
@Component
@Transactional(readOnly = true)
public class SystemNotifyMessageService extends BaseService {

	@SuppressWarnings("unused")
	private static Logger logger = LoggerFactory.getLogger(SystemNotifyMessageService.class);
	
	@Autowired
	private SystemNotifyMessageDao systemNotifyMessageDao;
	
	public SystemNotifyMessage get(Long id) {
		return systemNotifyMessageDao.findOne(id);
	}
	
	@Transactional(readOnly = false)
	public void save(SystemNotifyMessage systemNotifyMessage) {
		systemNotifyMessageDao.clear();
		systemNotifyMessageDao.save(systemNotifyMessage);
		systemNotifyMessageDao.refresh(systemNotifyMessage);
	}
	
	@Transactional(readOnly = false)
	public void delete(Long id) {
		systemNotifyMessageDao.delete(id);
	}
	
}
